package com.example.edianzu.somur.utils.content;

import android.util.Log;

import com.example.edianzu.somur.api.constans.AppContents;

/**
 * author：风不会停息 on 2017/7/19 16:25
 * mailbox：yh131412hys@163.com
 * project：MyApplication
 * tel：13295355900
 * describe：
 */

public class L {

    private static final String KEY = "--MainActivity--";

    public static void i(Object message) {
        if (AppContents.IS_DEBUG) {
            Log.i(KEY, message.toString());
        }
    }

    public static void e(Object message) {
        if (AppContents.IS_DEBUG) {
            Log.e(KEY, message.toString());
        }
    }

    public static void d(Object message) {
        if (AppContents.IS_DEBUG) {
            Log.d(KEY, message.toString());
        }
    }

    public static void w(Object message) {
        if (AppContents.IS_DEBUG) {
            Log.w(KEY, message.toString());
        }
    }

    public static void w(Object message, Throwable tr) {
        if (AppContents.IS_DEBUG) {
            Log.w(KEY, message.toString(), tr);
        }
    }

    // 下面是传入自定义tag的函数
    public static void i(String tag, Object msg) {
        if (AppContents.IS_DEBUG)
            Log.i(tag, msg.toString());
    }

    public static void d(String tag, Object msg) {
        if (AppContents.IS_DEBUG)
            Log.i(tag, msg.toString());
    }

    public static void e(String tag, Object msg) {
        if (AppContents.IS_DEBUG)
            Log.i(tag, msg.toString());
    }

    public static void v(String tag, Object msg) {
        if (AppContents.IS_DEBUG)
            Log.i(tag, msg.toString());
    }
}
